Learn R Programming

freesurferformats (version 1.1.0)

[[.fs.tracts: Access a single tract of an fs.tracts instance.

Description

For TCK data (see read.dti.tck), a tract is an n x 3 numeric matrix of coordinates. For TRK data (see read.dti.trk), a tract is a named list with the entries coords (n x 3 matrix), num_points (integer), scalars (n x n_scalars matrix or NULL) and properties (numeric vector or NULL).

This returns a copy of the requested tract, the data is stored in a single matrix internally.

Usage

# S3 method for fs.tracts
[[(x, i)

Value

the tract, see the description.

Arguments

x

an fs.tracts instance.

i

positive integer, the index of the tract to retrieve.

Examples

Run this code
if (FALSE) {
tck <- read.dti.tck("brain.tck");
first_tract_coords <- tck$tracks[[1]];
}

Run the code above in your browser using DataLab